#include <iostream>
#include <cmath>

#define N 100

using namespace std;

int main ( )
{
    int a,j;
    double i=0.0;
    long num;
    char s[N],ss[N];

    cout<<"enter the number"<<endl;
    cin>>num;
    while(num>pow(10,i)) i++;
    
    for(j=0;j<i;j++)
    {
        a=(num/pow(10,i-1-j));

        sprintf(s,"%i",a);

        ss[j]=s[0];
        num=num-pow(10,i-1-j)*a;
    }

    ss[j]='\0';
    puts(ss);

    cin>>j;
    return 0;
}
